package com.atwisdom.star.common.enums;

import com.atwisdom.star.common.util.RedisKeyUtil;

public enum FirstTypeEnum {
        MODEL("model", "模型"),
    COMPONENT("component", "组件");

        private String code;
        private String description;

        FirstTypeEnum(String code, String description) {
            this.code = code;
            this.description = description;
        }

        public String getCode() {
            return code;
        }

        public String getDescription() {
            return description;
        }

        public String getKey(String objectType, String identifyKey, String identifyValue, String field) {
            return RedisKeyUtil.getKey(this, objectType, identifyKey, identifyValue, field);
        }


        /**
         * 根据objectType获取key
         * @param objectType
         * @return
         */
        public String getKey(String objectType) {
            return RedisKeyUtil.getKey(this, objectType);
        }


}